<%--
  Created by IntelliJ IDEA.
  User: 86131
  Date: 2021/8/23
  Time: 10:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>管理员界面</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

    <!-- Bootstrap -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="js/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="js/bootstrap.min.js"></script>
    <script>
        $(function (){
            $('#menux a').click(function (){
                console.log($(this).attr("url"));
                $('iframe').attr("src",$(this).attr("url"));
            })
            $('#menux li').click(function (){
                $(this).addClass("active");
                $(this).siblings().removeClass("active");
                // 获取当前点击li 的下标
                let index = $(this).index() + 1;
                console.log(index);

            })
        })
    </script>
    <style>
        .header{
            height: 70px;
            background-color: #467FE6;

        }
        .title{
            padding-top: 0px;
            color: white;
            font-size: 30px;
            line-height: 70px;
        }
        body{
            background-color: #f8f8f8;
        }
        #image{
            height: 70px;
        }
    </style>
</head>
<body>
<div class="header">
    <p class="title"><img id="image" src="img/火车.png">12588火车后台管理系统</p>
</div>
<nav class="navbar navbar-default">
    <div class="container-fluid">

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul id="menux" class="nav navbar-nav">
                <li class="active"><a href="javascript:void(0);" url="trainMoving.html">首页<span class="sr-only">(current)</span></a></li>
                <li><a href="javascript:void(0);" url="${pageContext.request.contextPath}/TrainNumberListServlet">火车车次管理</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">火车车次添加<span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="javascript:void(0);" url="addTrainNumber.jsp">火车车次添加</a></li>
                        <li><a href="javascript:void(0);" url="addStation.jsp">过站添加</a></li>
                    </ul>
                </li>
                <li><a href="javascript:void(0);" url="${pageContext.request.contextPath}/OrderManager">订单管理</a></li>
<%--                <li><a href="${pageContext.request.contextPath}/PassengerListServlet">乘客信息列表</a></li>--%>
                <li><a href="javascript:void(0);" url="${pageContext.request.contextPath}/PassengerListServlet">乘客信息列表</a></li>
            </ul>

            <ul class="nav navbar-nav navbar-right">
                <li><a href="login.jsp">用户登录</a></li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
        <div class="container">
            <iframe src="trainMoving.html" frameborder="0" width="98%" height="98%" frameborder="0px"></iframe>
        </div>
</body>
</html>
